<template>
	<view class="footer">
		<view class="left-button button" v-if="leftTitle" @click="leftClicked">
			{{leftTitle}}
		</view>
		<view class="submit-button button" @click="buttonClicked">
			{{buttonTitle}}
		</view>
	</view>
</template>

<script>
	export default {
		name:"FormFooterView",
		data() {
			return {
				
			};
		},
		props:{
			buttonTitle:{
				default:'提交申请',
				typeof:String
			},
			leftButton:{
				default:false,
				typeof:Boolean
			},
			leftTitle:{
				default:'',
				typeof:String
			}
		},
		methods:{
			buttonClicked(){
				this.$emit('submitClicked')
			},
			leftClicked(){
				this.$emit('leftClicked')
			}
		}
	}
</script>

<style lang="scss" scoped>
	.footer{
		background-color:#fff;
		position: fixed;
		bottom:0;
		width:100%;
		display: flex;
		align-items: center;
		justify-content: space-between;
		box-shadow: 0rpx 2rpx 17rpx 0rpx rgba(9,72,184,0.17);
		left: 0;
		z-index: 99;
		padding-bottom: 10rpx;
		.button{
			border-radius: 45rpx;
			font-size: 35rpx;
			font-weight: 400;
			padding:15rpx;
			text-align:center;
			flex: 1;
		}
		.left-button{
			border: solid 1rpx #1E92F0;
			color: #1E92F0;
			margin:30rpx 53rpx;
		}
		.submit-button{
			background-color: #1E92F0;
			color: #FFFFFF;
			font-size: 31rpx;
			margin:30rpx 53rpx;
		}
	}
</style>